package Dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import entity.Oredr_details;
import Dao.Daoorder_details;
import utils.BaseDao;

public class Daoimplorder_details extends BaseDao implements Daoorder_details {

	@Override
	public boolean adddetails(String[] s,String ma) {
		int jia = 0;
		for (int i = 0; i < s.length; i++) {
			String sql = "insert into `xiangmu`.`order_details` (`orderid`, `prdid`) values (?, ?); ";
			int shuzhi = Integer.parseInt(s[i]);
			Object[] object = {ma,shuzhi};
			boolean hao = super.executeUpdate(sql, object);
			if(hao){
				jia++;
			}
		}
		
		return jia==s.length;
	}

	@Override
	public List<Oredr_details> sel(String orderid) {
		
		return null;
	}

}
